poly3d-h is a program to remove hidden lines from a given polygonal model. Freeform objects are preprocessed into polygons with controlled fineness.
The program performs 4 passes over the input:
1. Preprocesses and maps all polygons in a scene, and sorts them.
2. Generates edges out of the polygonal model and sorts them (preprocessing for the scan line algorithm) into buckets.
3. Intersects edges, and splits edges with non-homogeneous visibility (the scan line algorithm).
4. Applies a visibility test of each edge.
This program can handle CONVEX polygons only. From IRIT one can
ensure that a model consists of convex polygons only using the CONVEX command:
CnvxObj = convex( Obj );
just before saving it into a file. Surfaces are always decomposed into
triangles.
poly3d-h output is in the form of polylines. It is a regular IRIT data file that can be viewed using any of the display devices, for example.
poly3d-h [-b] [-m] [-i] [-e #Edges] [-H] [-4] [-W Width]
[-F PolyOpti FineNess] [-q] [-o OutName] [-c] [-z] DFiles > OutFile
-b: BackFacing - if an object is closed (such as most models created by IRIT), back facing polygons can be deleted, therefore speeding up the process by at least a factor of two. -m: More - provides some more information on the data file(s) parsed. -i: Internal edges (created by IRIT) - default is not to display them, and this option will force displaying them as well. -e n: Number of edges to use from each given polygon (default all). Handy as '-e 1 -4' for freeform data. -H: Dumps both visible lines and hidden lines as separated objects. Hidden lines will be dumped using a different (dimmer) color and (a narrower) line width. -4: Forces four polygons per almost flat region in the surface to polygon conversion. Otherwise two polygons only. -W Width: Selects a default width for visible lines in inches. -F PolyOpti FineNess: Optimality of polygonal approximation of surfaces. See the variable POLY_APPROX_OPT for the meaning of FineNess. See also -4. -q: Quiet mode. No printing aside from fatal errors. Disables -m. -o OutName: Name of output file. Default is stdout. -z: Prints version number and current defaults. -c: Clips data to screen (default). If disabled ('-c-'), data outside the view screen ([-1, 1] in x and y) are also processed.
Some of the options may be turned on in poly3d-h.cfg. They can be then turned off in the command line as '-?-'.
The program can be configured using a configuration file named poly3d-h.cfg. This is a plain ASCII file you can edit directly and set the parameters according to the comments there. 'poly3d-h -z' will display the current configuration as read from the configuration file.
The configuration file is searched in the directory specified by the IRIT_PATH environment variable. For example, If the IRIT_PATH variable is not set, the current directory is searched.
As this program is not interactive, usage is quite simple, and the only control available is using the command line options.